package org.example.book.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.book.bean.Book;

import java.util.List;

@Mapper
public interface BookMapper {//增删改查
    void addBook(Book book);
    void deleteBookById(int id);
    void updateBook(Book book);
    Book queryBookById(int id);
    List<Book> queryAllBooks();
    // 在 BookMapper.java 中添加以下方法
List<Book> queryBooksByPriceRange(@Param("minPrice") Double minPrice, @Param("maxPrice") Double maxPrice);


}
